/*
 * CServer.h
 *
 *  Created on: 25.07.2009
 *      Author: oli
 */

#ifndef CSERVER_H_
#define CSERVER_H_

#define MAX_CLIENTS 16
#define SERVER_PORT 60000

#include "./IServerCallbacks.h"
#include "./ZoidStuff/CServer_ZoidCom.h"
#include "./ZoidStuff/CLobbyRadio_ZoidCom.h"
#include <QObject>

class CServer : public QObject, IServerCallbacks
{
        Q_OBJECT
private:
        QObject* m_pConfigDialog;
        bool m_bServerstarted;
        ZoidCom* m_pZoidCommunicator;
        CZoidServer* m_pZoidServ;
        void StartServer(int port);
        CZoidLobbyRadio* m_pLobbyRadio;
        void RegisterClassesForZoidOP();
public:
        CServer(QObject* parent = 0);
        ~CServer();
        void SetCallbackGUI(QObject* CallbackGUI);
        int Port;
        void emitLogMessages(QString message);

public slots:
        void start();

signals:
        void emit_UpdateServerLog(QString logMessage);
};

#endif /* CSERVER_H_ */
